package com.bjmashibing.system.OSFileIO.io_demo.anotherStream;

import java.io.*;
import java.nio.charset.StandardCharsets;

/**
 * 没啥特点
 */
public class BufferedOutputStreamDemo {
    public static void main(String[] args) throws IOException {
        demo1();
    }

    private static void demo1() throws IOException {
        File file = new File("src/Java_IO/io_demo/Resources/abc.txt");
        FileOutputStream outputStream = new FileOutputStream(file);
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
        bufferedOutputStream.write(98);
        bufferedOutputStream.write("david".getBytes(StandardCharsets.UTF_8));
        bufferedOutputStream.close();
        outputStream.close();

    }




}
